<script setup>
const props = defineProps(['student'])
const emit = defineEmits(['update:student'])

// 模拟名称被修改，看看是否是双向绑定
setTimeout(() => {
    emit('update:student', '小黑');
}, 2000);
</script>

<template>
    <div>
        {{ student.name }}-{{ student.age }}-{{ student.gender }}
    </div>
</template>